package com.code.day17JiHe.Fangfay;

import java.util.function.Supplier;

public class Demo01 {
    public static void main(String[] args) {

        method(new Supplier<String>() {
            @Override
            public String get() {
                return " 碎碎念 ".trim();
            }
        });
         method("hello world"::trim);
    }


    public static void method(Supplier<String> supplier){
        String s = supplier.get();
        System.out.println("s ="+s);
    }
}

